//
//  FuncBottleCollectionViewCell.m
//  KidReading
//
//  Created by YangShuai on 16/11/19.
//  Copyright © 2016年 刘赞黄Telen. All rights reserved.
//

#import "FuncBottleCollectionViewCell.h"
#import "ConstDefine.h"

@interface FuncBottleCollectionViewCell ()

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottleTop;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottleRight;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottleLeft;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bookCoverWidth;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bookCoverBottom;


@property (weak, nonatomic) IBOutlet UIButton *actionButton;


@end

@implementation FuncBottleCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    //
    CGFloat ratio = [DataProcessing shareSingle].ratio_w;
    self.layer.cornerRadius = 5 / ratio;
    self.layer.masksToBounds = YES;
    self.layer.borderColor = [UIColor colorWithHexString:@"#757575"].CGColor;
    self.layer.borderWidth = 1;
    //
    _bottleTop.constant /= ratio;
    _bottleLeft.constant /= ratio;
    _bottleRight.constant /= ratio;
    _bookCoverWidth.constant /= ratio;
    _bookCoverBottom.constant /= ratio;
    //
    [_actionButton addTouchScaleTransitions_forView:self];
}
- (IBAction)tapBottleAction:(id)sender {
    if (_tapBottleBlock) {
        _tapBottleBlock(_audioDict);
    }
}

@end
